﻿@model IEnumerable<Senac.Escola.Projeto.Models.Categoria>

@{
    ViewBag.Title = "Index";
}

<h2>TURMA</h2>


<table class="table">
    <tr>
        <th>
            Login
        </th>
        <th>
            Descricao
        </th>
        <th>
            Professor
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nome)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Descricao)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Professor.Nome)
        </td>
        <td>
            <div class="btn">
                @Html.ActionLink("Editar", "Edit", new { id=item.CategoriaID })
            </div>
            <div class="btn">
                @Html.ActionLink("Deletar", "Delete", new { id=item.CategoriaID })
            </div>
        </td>
    </tr>
}

</table>
<p>
    <div class="btn btn-danger">
    @Html.ActionLink("Criar nova turma", "Create")
    </div>
</p>
